package com.hmall.mapper;

import com.hmall.model.MallOrder;
import com.hmall.model.MallOrderItem;
import com.hmall.model.MallProductPlanItem;
import com.hmall.util.MyMapper;
import com.hmall.vo.MallProductPlanItemVo;
import com.hmall.vo.PlanMonthVo;
import com.hmall.vo.planMonthItemVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface MallProductPlanItemMapper extends MyMapper<MallProductPlanItem> {
    List<MallProductPlanItemVo> selectByPlanId(@Param("plan_no") Long plan_no);

    List<MallProductPlanItem> selectByMonth(@Param("dealer_id") Integer dealer_id,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<MallProductPlanItem> selectByUserIdAndMonth(@Param("user_id") int user_id,@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<MallProductPlanItem> selectProductMonthData(@Param("product_id") int product_id,@Param("dealer_id") int dealer_id,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    MallProductPlanItem checkItem(@Param("planNo") Long planNo,@Param("product_id") Integer product_id,@Param("grade") String grade);

    List<planMonthItemVo> selectMonthItem(@Param("product_id") Integer product_id, @Param("grade") String grade, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
}